Let G be a simple linear algebraic group defined over the complex numbers. Fix a proper parabolic subgroup P of G and a nontrivial antidominant character \chi of P. We prove that a holomorphic principal G-bundle E over a connected complex projective manifold M is semistable and the second Chern class of its adjoint bundle vanishes in rational cohomology if and only if the line bundle over E/P defined by \chi is numerically effective. Similar results remain valid for principal bundles with a reductive linear algebraic group as the structure group. These generalize an earlier work of Y. Miyaoka where he gave a characterization of semistable vector bundles over a smooth projective curve. Using these characterizations one can also produce similar criteria for the semistability of parabolic principal bundles over a compact Riemann surface.